package cn.roadtrip.utilmodule.util.enumpck;

/**
 * 活动类型
 */
public enum Enum_ActiveItemType {
    //-；-
    Product("Product", "产品"),
    TravelLine("TravelLine", "路线");

    private String s;
    private String title;

    Enum_ActiveItemType(String s, String title) {
        this.s = s;
        this.title = title;
    }
    Enum_ActiveItemType(String s) {
        this.s = s;
        this.title = Enum_LoginPlat.parseCode(s).getTitle();
    }

    public String getTitle() {
        return this.title;
    }

    public String getCode() {
        return this.s;
    }

    public static final Enum_ActiveItemType parseCode(String code) {
        switch (code) {
            case "Product":
                return Product;
            case "TravelLine":
                return TravelLine;
        }
        return null;
    }

    @Override
    public String toString() {
        return "(code:%s, title:%s)".formatted(this.s, this.title);
    }
}
